import http from '@/services/request'

// 获取注册用户列表
export const getAccountList = (params) => {
  return http({
    url: 'api/marketing/user/admin/list',
    method: 'get',
    params,
  })
}

// 获取审核列表
export const getNeedPassed = (params) => {
  return http({
    url: 'api/marketing/user/admin/applyRoleList',
    method: 'get',
    params,
  })
}

// 同意申请的角色
export const passApply = (data) => {
  return http({
    url: 'api/marketing/user/admin/agreeRole',
    method: 'post',
    data,
  })
}
// 拒绝申请的角色
export const rejectApply = (data) => {
  return http({
    url: 'api/marketing/user/admin/rejectRole',
    method: 'post',
    data,
  })
}

// 获取待审核的角色总数
export const getApplyNumber = () => {
  return http({
    url: 'api/marketing/user/admin/applyRoleTotal',
    method: 'get',
  })
}

// 修改用户角色权限
export const updateUserRight = (data) => {
  return http({
    url: 'api/marketing/user/admin/simpleSwitchRole',
    method: 'post',
    data,
  })
}

// 获取提现记录
export const getWithdrawalList = (params) => {
  return http({
    url: 'api/marketing/user/admin/assetsOrder',
    method: 'get',
    params,
  })
}

// 获取注册用户列表
export const getUsers = (params) => {
  return http({
    url: 'api/marketing/user/admin/list',
    method: 'get',
    params,
  })
}
// 模糊获取注册用户列表
export const getUsersLikes = (params) => {
  return http({
    url: 'api/marketing/user/admin/search',
    method: 'get',
    params,
  })
}
